<?php

use Biz\service\trade\Cart as sCart;

/**
 * @deprecated
 */
class ChangeSkuAction extends ActionPlugin
{
    const USER_LEVEL = self::LEVEL_VISITOR;

    public function main()
    {
        $oldSkuId = $this->getRequest()->getPost('old_sku_id');
        $newSkuId = $this->getRequest()->getPost('new_sku_id');

        $result = sCart::changeSku(($this->uid > 0) ? $this->uid : $this->vid, $oldSkuId, $newSkuId, $this->appType);

        $this->setSuccess($result);
    }
}